<?php
namespace App\Http\Controllers\Api\V1\Resources;

use Illuminate\Http\Resources\Json\JsonResource;

class ProductExpressesResource extends JsonResource
{
    public function toArray($request)
    {
    	$data = $this->resource;
    	
        return [
        	'id' => (int)$data->id,
	        'product_id' => (int)$data->product_id,
	        'province_code' => $data->province_code ?? 0,
	        'is_allowed' => $data->is_allowed ?? 0,
	        'money' => $data->money ?? 0,
	        'created_at' => (string)$data->created_at,
        ];
    }
}
